package initialize

import (
	"exercise/application/yiran/app"
	"github.com/go-ini/ini"
	"path/filepath"
)

//引入包
//1.go get -u github.com/go-ini/ini

// Env 初始化配置数据
func Env(section string, key string) *ini.Key {
	config, err := ini.Load(filepath.Join(app.YiRanDir, ".env.ini"))
	if err != nil {
		panic(err.Error())
	}
	return config.Section(section).Key(key)
}
